{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=349
  Verdict: Accepted
}
uses SysUtils, Math;
 
var
	i:longint;
	a,b,c,d:int64;
 
begin
reset(input,'input.txt');
rewrite(output,'output.txt');
read(a,b,c,d);
for i:=1000 downto 0 do
	if a*i*i*i+b*i*i+c*i+d=0 then write(i,' ');
end.